package jdbc.simple_factory.creator;

import java.sql.Connection;

import jdbc.simple_factory.concrete_product.MysqlConnection;
import jdbc.simple_factory.concrete_product.OracleConnection;

public class JDBCFactory {
	public static Connection getConnection(String DataBaseType){
		if("oracle".equals(DataBaseType)){
			return new OracleConnection().getConnection();
		}
		else if("mysql".equals(DataBaseType)){
			return new MysqlConnection().getConnection();
		}
		else return null;
	}
}
